#include <stdio.h>
/*Bubble sorts:Pointer version*/
void bubble_p(long *data,int count){
    long i, last, t;
    for(last = count-1; last > 0; last--){ 
        for(i = 0; i < last; i++){
            if(*(data+i+1)<*(data+i)){
                t = *(data+i+1);
                *(data+i+1) = *(data+i);
                *(data+i) = t;
            }
        }
    }
}

void main(){
    int i;
    long data[5]={4, 1, 0, 2, 3};
    bubble_p(data, 5);
    for(i=0; i<5; i++)
    {
        printf("%ld\t", *(data+i));
    }
    printf("\n");
}
